package com.dj.web.ajax.pub.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

/**
 * 注册验证器
 * 
 * @author jaen.hsu.cn@gmail.com 2012-4-19 下午1:23:24
 */
@Controller
@RequestMapping("/reg_v")
public class RegistValidator {

    @RequestMapping(value = "/validate_loginId")
    public ModelAndView validateLoginId(@RequestParam String loginId) {
        ModelAndView result = new ModelAndView();
        result.addObject("_data_", new ValidateLoginIdResult(true));
        // result.setViewName("/xxx/xxx");
        return result;
    }

    class ValidateLoginIdResult {

        public ValidateLoginIdResult(){

        }

        public ValidateLoginIdResult(boolean result){
            this.result = result;
        }

        private boolean result = false;

        public boolean isResult() {
            return result;
        }

        public void setResult(boolean result) {
            this.result = result;
        }

    }

}
